package blockchain.mystream;

import java.io.IOException;

public interface MyDataInputStreamInterfaceNoExcept extends MyDataInputStreamInterface {
    @Override
    default String read() {
        try {
            return MyDataInputStreamInterface.super.read();
        } catch (IOException e) {
            System.err.println("读取数据时发生错误: " + e.getMessage());
        }
        return "";
    }
    @Override
    default int readInt() {
        try {
            return MyDataInputStreamInterface.super.readInt();
        } catch (IOException e) {
            System.err.println("读取数据时发生错误: " + e.getMessage());
        }
        return -1;
    }
}
